package cn.quang.search.admin.mapper;


import cn.quang.search.admin.entity.po.SearchScenePresetConditionConfig;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author:  Entity Generator
 * @since:  2024-03-26 15:23:39
 */
public interface SearchScenePresetConditionConfigMapper extends BaseMapper<SearchScenePresetConditionConfig> {

    @Select(
            " SELECT * FROM search_scene_preset_condition_config WHERE scene_id = #{sceneId} "
    )
    List<SearchScenePresetConditionConfig> selectBySceneId(@Param("sceneId") long sceneId);

    @Select(
            " SELECT * FROM search_scene_preset_condition_config WHERE field_dic_id = #{fieldDicId} and field_type = 1 "
    )
    List<SearchScenePresetConditionConfig> selectByFieldDicId(long fieldDicId);

    @Select(
            " SELECT * FROM search_scene_preset_condition_config WHERE field_dic_id = #{fieldDicId} and field_type = 2 "
    )
    List<SearchScenePresetConditionConfig> selectByConditionId(long conditionId);
}
